package com.ramos.kuaixiao.ui;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;

import com.githang.statusbar.StatusBarCompat;
import com.ramos.kuaixiao.R;
import com.ramos.kuaixiao.utils.AppManager;
import com.ramos.kuaixiao.utils.SharedPreference;

public class BaseActivity extends FragmentActivity {
    private final static String TAG = "BaseActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if(SharedPreference.getPreferString("type").equals("20")){
            StatusBarCompat.setStatusBarColor(this, getResources().getColor(R.color.title_mall), false);
        } else {
            StatusBarCompat.setStatusBarColor(this, getResources().getColor(R.color.title), false);
        }
        AppManager.getAppManager().addActivity(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        AppManager.getAppManager().removeActivity(this);
    }
}
